#include "bs_bos_core_data_storage_stdafx.h"

#include "numpy_tools.h"

#ifdef BSPY_EXPORTING_PLUGIN
namespace blue_sky {
namespace numpy_tools {  

	BS_API_PLUGIN boost::python::ssize_t 
	get_len (const boost::python::object &obj)
	{
		namespace bp = boost::python;
		return bp::len (obj.attr ("data")) / (bp::ssize_t)bp::extract<bp::ssize_t> (obj.attr ("itemsize"));
	}
}}
#endif